
public class QuackCounter implements Quackable {
	Quackable duck;
	static int numberOfQuacks = 0;

	public QuackCounter(Quackable duck) {
		this.duck = duck;
	}
	
	@Override
	public void quack() {
		duck.quack();
		numberOfQuacks++;
	}

	public static int getQuacks() {
		return numberOfQuacks;
	}
	
	public static void resetQuacks() {
		numberOfQuacks = 0;
	}

	@Override
	public void registerObserver(Observer observer) {
		duck.registerObserver(observer);
		
	}

	@Override
	public void notifyObservers() {
		duck.notifyObservers();
		
	}
}
